{% extends "pcadmin/pcadmin_base.html" %}
{% block globalconteiner %}




<table class="table_layout">
<tr>
<td width="40%">
<h3>Список Агентов.</h3>
    <table class="table_layout">
    {% for agent in agent_list %}
      <tr>
        <td>
        {% if agent.state %}
            <font color="green">OK</font>
        {% else %}
            <font color="red">Связь потеряна</font>
            
        {% endif %}
        </td>
        <td><a href="{% url agent_details agent.id %}">{{ agent.apid }}</a></td>
        <td>{{ agent.description }}</td>
        <td>{{ agent.last_conn_date|date:"d.m.Y - H:i:s" }}</td>
      </tr>
    {% empty %}
        <tr><td>Sorry, no agent in this list!</td></tr>
    {% endfor %}
    </table>
</td>
<td width="60%">
  <h3>Журнал сообщений всех агентов:</h3>
  <div id="log-view">
  
  </div>
</td>
</tr>
</table>


<script  type="text/javascript">
function timedCount()
{
  $("#log-view").load("{% url get_loglist_ajax 0 %}");
  t=setTimeout("timedCount()",8000);
}

$(document).ready(function(){
  timedCount();
})
</script>



{% endblock %}